package com.xinyu.mapper;

import com.xinyu.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinyu.vo.UserRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author: XinYu
 * @since 2025-02-17
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from tb_user where phone = #{phone}")
    User findByPhone(String phone);

    List<User> queryByCondition(UserRequest userRequest);

    Integer countUsers(UserRequest userRequest);
}
